Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

is-any-array

Package Overview
Dependencies
Maintainers
4
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

is-any-array

Check if toString.call ends with Array

  • 0.1.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
246K
decreased by-47.16%
Maintainers
4
Weekly downloads
 
Created

What is is-any-array?

The is-any-array npm package is a utility that helps determine if a given value is an array. It is particularly useful in scenarios where you need to validate input types or ensure that certain operations are performed on arrays.

What are is-any-array's main functionalities?

Basic Array Check

This feature allows you to check if a given value is an array. It returns true if the value is an array and false otherwise.

const isAnyArray = require('is-any-array');

console.log(isAnyArray([1, 2, 3])); // true
console.log(isAnyArray('not an array')); // false

Array-like Objects Check

This feature extends the basic array check to include array-like objects such as typed arrays. It helps in identifying more complex array structures.

const isAnyArray = require('is-any-array');

console.log(isAnyArray({ length: 0 })); // false
console.log(isAnyArray(new Int8Array(2))); // true

Other packages similar to is-any-array

FAQs

Package last updated on 11 Feb 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc